import { createApp } from 'vue';
import './styles/style.css';
import './styles/iconfont/iconfont.css';
import './styles/iconfont/iconfont.js';
import App from './App.vue';
import router from './router/index';
import './router/permission';
import pinia from './stores/index';
import * as ElementPlusIconsVue from '@element-plus/icons-vue';
import i18n from './language/index';
import { initTheme } from './utils/theme.js';

const APP = createApp(App);
APP.use(pinia);
APP.use(router);
APP.use(i18n);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
	APP.component(key, component);
}
APP.mount('#app').$nextTick(() => {
	initTheme();
});
